|
RAIS
3.2
|
00001 using System; 00002 using System.Collections; 00003 using System.Configuration; 00004 using System.Data; 00005 using System.Linq; 00006 using System.Web; 00007 using System.Web.Security; 00008 using System.Web.UI; 00009 using System.Web.UI.HtmlControls; 00010 using System.Web.UI.WebControls; 00011 using System.Web.UI.WebControls.WebParts; 00012 using System.Xml.Linq; 00013 using RAIS.ApplicationLogicLayer; 00014 using RAIS.Common.DynamicMaskManagement; 00015 00016 namespace RAIS.UI.SpecificMasks 00017 { 00021 public partial class Log_file : System.Web.UI.Page 00022 { 00023 protected void Page_PreLoad(object sender, EventArgs e) 00024 { 00025 RAIS.UI.Common.PageManagement.TrimTextBoxValues(this); 00026 } 00027 private LogFileCollection LogFile 00028 { 00029 get 00030 { 00031 if (Session["LogFile"] != null) return (LogFileCollection)Session["LogFile"]; 00032 else return null; 00033 } 00034 set { Session["LogFile"] = value; } 00035 } 00036 private int PrimaryKey 00037 { 00038 get 00039 { 00040 if (Session["PrimaryKeyID"] != null) return (int)Session["PrimaryKeyID"]; 00041 else return -1; 00042 } 00043 set { Session["PrimaryKeyID"] = value; } 00044 } 00045 00046 public bool ShowHistory(DynamicMaskData dynamicMask, Page parent) 00047 { 00048 int PrimaryKey = (int)dynamicMask.CurrentRow[dynamicMask.DynamicMask.Table.PrimaryKeyFieldName]; 00049 LogFileCollection log = new LogFileCollection(dynamicMask.DynamicMask.Table.ID, PrimaryKey); 00050 LogFile = log; 00051 LogFile.TableName = dynamicMask.DynamicMask.Name; 00052 parent.ClientScript.RegisterStartupScript(parent.GetType(), "qw", "<script language=\"JavaScript\">ShowLog();</script>"); 00053 return true; 00054 } 00055 protected void Page_Load(object sender, EventArgs e) 00056 { 00057 this.Response.Cache.SetNoStore(); 00058 if (LogFile != null) 00059 { 00060 lbTitle.Text = "Log-File of mask: '" + LogFile.TableName + "'"; 00061 dgHistory.DataSource = LogFile; 00062 dgHistory.DataBind(); 00063 } 00064 } 00065 } 00066 }